<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * mstplacement.php
 * @author ranuandra
 *
 * 12 Mar 2012 13:38:35
 *
 * 
 */
class Model_Mstplacement extends ORM
{
	
	protected $_has_many = array(
		'mstlowongans'       => array('model' => 'mstlowongan', 'through' => 'mstlowongans_mstplacements'),
	);
	
	private $_field = array('placement', 'flag');
	private $_form = array('placement' => '', 'flag'=>'');
	
	public $rules = array(
					'placement' => array(
									array('min_length', array(':value', 0)),
								),
					'flag' => array(
									array('min_length', array(':value', 0)),
								),
	);
	
	public function getField()
	{
		return $this->_field;
	}
	
	public function getForm()
	{
		return $this->_form;
		
	}
	
	public function create_data($values)
	{
	    return $this->values($values, $this->_field)->create();
	}
}